<?php


namespace Drupal\shushengyuan\Schemas;


class UserAuthor extends User {

  protected function setValue() {
    parent::setValue();
    if (module_exists('mxm_adminuser')) {
      //昵称覆盖
      $nickname = $this->wrapper->adminuser->nickname->value();
      if (empty($nickname)) {
        $nickname = '舒生元';
      }
      $value = [
        'nickname' => (string) $nickname,
      ];
      $this->merge($value);
    }
  }

}
